import request from '@/utils/request'

export type MeetingVO = {
  id: number
  state: number
  reason: string
  processInstanceId: string
  startTime: string
  endTime: string
  createTime: string
}

// 获得角色分表
export const getUserList = async (params: any) => {
  return await request.get({ url: '/system/user/page', params })
}

// 创建会议室
export const createMeetingRoom = async (data: MeetingVO) => {
  return await request.post({ url: '/system/meeting-room/create', data: data })
}

// 获取会议室详情
export const getMeetingRoom = async (id: number) => {
  return await request.get({ url: '/system/meeting-room/get?id=' + id })
}

// 更新会议室
export const putMeetingRoom = async (data: MeetingVO) => {
  return await request.put({ url: '/system/meeting-room/update', data })
}

//删除会议室
export const deleteMeetingRoom = async (id: number) => {
  return await request.delete({ url: '/system/meeting-room/delete?id=' + id })
}

// 获取会议室列表
export const getMeetingRoomPage = async (params: any) => {
  return await request.get({ url: '/system/meeting-room/page', params })
}

// 创建会议
export const createMeeting = async (data: MeetingVO) => {
  return await request.post({ url: '/bpm/meeting/create', data: data })
}
 // 修改会议详情
export const updateMeeting= async (data: MeetingVO) => {
  return await request.put({ url: `/bpm/meeting/update`, data })
}

// 获得会议详情
export const getMeeting = async (id: number) => {
  return await request.get({ url: '/bpm/meeting/get?id=' + id })
}

// 获得会议列表分页
export const getMeetingPage = async (params: any) => {
  return await request.get({ url: '/bpm/meeting/page', params })
}

//删除会议详情
export const deleteMeeting = async (id: number) => {
  return await request.delete({ url: '/bpm/meeting/delete?id=' + id })
}
